import { postForm, get, put } from '@/utils/request'

// 获取列表
export function getRecords(listQuery) {
  return get('/hospital/building/list/page/token', listQuery)
}

export function getList(listQuery) {
  return get('/hospital/building/list', listQuery)
}

export function getLDList(hospitalId, parentId) {
  return get('/hospital/building/list', { hospitalId: hospitalId, parentId: parentId })
}

export function add(optData) {
  return postForm('/hospital/building', optData)
}

export function edit(optData) {
  return put('/hospital/building', optData)
}

export function del(ids) {
  return postForm('/hospital/building/del/batch', { pkIds: JSON.stringify(ids) })
}

export default { add, edit, del }
